home *** CD-ROM | disk | FTP | other *** search
/ Software Vault: The Games Collection 1 / software vault.zip / software vault / CDR02 / DCGAMES1.ZIP / NEWGAME.ZIP / PRISONER.SCR < prev    next >
Text File  |  1992-09-08  |  3KB  |  121 lines

  1. !
  2. ! Default prisonner script..
  3. !
  4. ! (c) DC Software, 1992
  5. !
  6.  
  7. !------------------------------------------------------------------------!
  8. :@TALK ! Talk to the character !
  9. !------------------------------------------------------------------------!
  10.  
  11. ! First, say hello.. !
  12.   if NPC.V0 > 0 then
  13.     if NPC.V1 > 0 goto AFTER;
  14.     writeln( "You're back.. I thought you were going to leave me here.." );
  15.   else
  16.     writeln( "Are you here to help me?" );
  17.   endif;
  18.  
  19. ! Now, set some variables..
  20.   NPC.V0 = 1; ! From know on, remember we've been here
  21.  
  22. :CHAT
  23.   L3 = getstr("Name","Job","Join","Bye");
  24.   if L3 = -1 then 
  25.     writeln( "Don't leave me here.. Please.." );
  26.     goto CHAT; ! Pressed ESCape !
  27.   endif;
  28.  
  29. ! Handle JOIN differently..
  30.   if L3 = 2 then 
  31.     if group.size = 6 then
  32.       writeln( "Your party is full!" );
  33.       goto CHAT;
  34.     endif;
  35.     player.v1 = 1; ! 1 when I join the party, 2 if delivered to quester !
  36.     if NOT dotext( S0 ) then
  37.       writeln( "The sooner the better.." );
  38.     endif;
  39.     JOIN;
  40.   endif;
  41.  
  42. ! First, see if the keyword typed is in the character's text block !
  43.   if dotext( S0 ) goto CHAT;
  44.  
  45. ! It didn't, so try the predefined ones..
  46.   on L3 goto CNAME, CJOB, CHAT, CSTOP;
  47.  
  48. ! Nope, try a 'DEFAULT' line
  49.   if not dotext( "DEFAULT" ) then
  50.     writeln( "I don't know anything about that!" );
  51.   endif;
  52.   goto CHAT;
  53.  
  54. :CNAME
  55.   writeln( "My name is ", NPC.name, "." );
  56.   GOTO CHAT;
  57.  
  58. :CJOB
  59.   writeln( "I am a ", npc.type );
  60.   GOTO CHAT;
  61.  
  62. :CSTOP
  63.   writeln( "Don't leave me here.. Please.." );
  64.   STOP;
  65.  
  66. !
  67. ! This is the script for AFTER I've been rescued !
  68. !
  69. :AFTER
  70.  
  71.   if npc.v1 = 1 then ! We JOINED, but were not delivered !
  72.     if NOT dotext( "DELIVER" ) then
  73.       writeln( "I need your help to return home.." );
  74.     endif;
  75.     goto CHAT;
  76.   endif;
  77.  
  78. :CHAT2
  79.   L3 = getstr("Name","Job","Join","Bye");
  80.  
  81. ! First, see if the keyword typed is in the character's text block !
  82.   if dotext( S0 ) goto CHAT2;
  83.  
  84. ! It didn't, so try the predefined ones..
  85.   on L3 goto CNAME2, CJOB2, CJOIN2, CSTOP2;
  86.  
  87. ! Nope, try a 'DEFAULT' line
  88.   if not dotext( "DEFAULT" ) then
  89.     writeln( "I don't know anything about that!" );
  90.   endif;
  91.   goto CHAT2;
  92.  
  93. :CNAME2
  94.   writeln( "My name is ", NPC.name, "." );
  95.   GOTO CHAT2;
  96.  
  97. :CJOB2
  98.   writeln( "I am a ", npc.type );
  99.   GOTO CHAT2;
  100.  
  101. :CJOIN2
  102.   writeln( "Sorry.  I've had my fill of adventure.." );
  103.   GOTO CHAT2;
  104.  
  105. :CSTOP2
  106.   writeln( "Nice talking to you.." );
  107.   STOP;
  108. !------------------------------------------------------------------------!
  109. !
  110. :@DROP  ! DROP a player from the group. !
  111. !
  112. !------------------------------------------------------------------------!
  113.   !
  114.   ! Here, you can handle the 'vacate' action for the prisoner.  Omit
  115.   ! the CONTINUE command tells the system that even though we took some
  116.   ! action, standard processing should be taken anyway.  Change it to 
  117.   ! a 'STOP' if you do not want standard processing to take place.
  118.   !
  119.   CONTINUE;
  120.  
  121.